<?php

/**
 * 外部接口
 * @author chenchao
 * @version 1.0
 */
class appService {
	
	public static function loadService($transportType) {
		$appFile = ROOT_PATH.DIRECTORY_SEPARATOR . 'appService' . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . strtolower($transportType) . '.php';
		$appClass = 'Transport_'.strtolower($transportType).'_call';
		
		if (file_exists($appFile)) {
			include_once $appFile;
			return new $appClass;
		}else {
			throw new Exception('没有指定的文件!');
		}
	}
	
}

